package com.example.city_home_app;

import com.example.city_home_app.Bean.Down_Captcha;
import com.example.city_home_app.Bean.Down_City;
import com.example.city_home_app.Bean.Down_Community;
import com.example.city_home_app.Bean.Down_Login;
import com.example.city_home_app.Bean.Down_Moment;
import com.example.city_home_app.Bean.Down_MomentComment;
import com.example.city_home_app.Bean.Down_Msg;
import com.example.city_home_app.Bean.Down_MsgCencter;
import com.example.city_home_app.Bean.Down_MyFocus;
import com.example.city_home_app.Bean.Down_News;
import com.example.city_home_app.Bean.Down_NewsComment;
import com.example.city_home_app.Bean.Down_NewsReply;
import com.example.city_home_app.Bean.Down_Post;
import com.example.city_home_app.Bean.Down_PostComment;
import com.example.city_home_app.Bean.Down_PostReply;
import com.example.city_home_app.Bean.Down_Universe;
import com.example.city_home_app.Bean.Down_Update;
import com.example.city_home_app.Bean.Down_UserInfo;
import com.example.city_home_app.Bean.Down__Image;

import java.util.List;
import java.util.Map;

import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.PartMap;
import retrofit2.http.Query;

public interface Service {
    @POST("login")
    Call<Down_Login> login(@Query("username") String LoginName,
                           @Query("password") String LoginPassword);

    @POST("reg")
    Call<Down_Universe> reg(@Query("loginname")String loginname,@Query("email")String email,@Query("captchacode") String code,
                            @Query("captchaid")int codeid,@Query("city") int cityid,@Query("gender")int gender,@Query("username") String username,
                            @Query("password")String password);
    @POST("sendemail")
    Call<Down_Captcha> getcheckcode(@Query("recive")String email);

    @POST("forgotuserpassword")
    Call<Down_Universe> forgotuserpassword(@Query("email")String email,@Query("captchacode") String code,
                                           @Query("captchaid")int codeid,@Query("password")String password);

    @POST("getcitylist")
    Call<List<Down_City>> getcitylist();

    @POST("getnewlist")
    Call<List<Down_News>> getnewlist(@Query("cityid") int cityid);

    @POST("getnews")
    Call<Down_News> getnew(@Query("newsid") int nuwsid);

    @POST("addnewsHot")
    Call<Down_Universe> addnewsHot(@Query("newsid") int newsid);

    @POST("getnewscomment")
    Call<List<Down_NewsComment>> getNewsComment(@Query("newsid") int newsid);

    @POST("getreplynewcomment")
    Call<List<Down_NewsReply>> getReplyNewComment(@Query("commentid") int commentid);

    @POST("likenewcomment")
    Call<Down_Universe> likenewcomment(@Query("userid") int userid,@Query("commentid") int commentid,@Query("newsid") int newsid);

    @POST("unlikenewcomment")
    Call<Down_Universe> unlikenewcomment(@Query("userid") int userid,@Query("commentid") int commentid,@Query("newsid") int newsid);

    @POST("islikenewcomment")
    Call<Down_Universe> islikenewcomment(@Query("userid") int userid,@Query("commentid") int commentid);

    @POST("getlikenewcomment")
    Call<Down_Universe> getlikenewcomment(@Query("userid") int userid);

    @POST("upnewcomment")
    Call<Down_Universe> upnewcomment(@Query("newsid") int newsid,@Query("userid") int userid,@Query("content") String content);

    @POST("replynewcomment")
    Call<Down_Universe> replynewcomment(@Query("newsid") int newsid,@Query("commentid") int commentid,@Query("userid") int userid,
                                        @Query("content") String content);

    @POST("getcommunitylist")
    Call<List<Down_Community>> getcommunitylist();

    @POST("focuscommunity")
    Call<Down_Universe> focuscommunity(@Query("communityid")int communityid,@Query("userid")int userid);

    @POST("unfocuscommunity")
    Call<Down_Universe> unfocuscommunity(@Query("communityid")int communityid,@Query("userid")int userid);

    @POST("isfocuscommunity")
    Call<Down_Universe> isfocuscommunity(@Query("communityid")int communityid,@Query("userid")int userid);

    @POST("getpostlist")
    Call<List<Down_Post>> getpostlist(@Query("type")int type,@Query("cityid")int cityid);

    @POST("getpostlistforcommunity")
    Call<List<Down_Post>> getpostlistforcommunity(@Query("type")int type,@Query("cityid")int cityid,@Query("communityid")int communityid);

    @POST("searchpost")
    Call<List<Down_Post>> searchpost(@Query("search")String search,@Query("cityid")int cityid);


    @Multipart
    @POST("uppostimgs")
    Call<List<Down__Image>> uppostimgs(@PartMap Map<String,RequestBody> data);

    @POST("delpostimgs")
    Call<Down_Universe> delpostimgs(@Query("data")String data);

    @POST("uppost")
    Call<Down_Universe> uppost(@Query("city")int cityid,@Query("community")int communityid,@Query("title")String title,@Query("content")String content,@Query("userid")int userid);

    @POST("getpost")
    Call<Down_Post> getpost(@Query("postid")int postid);

    @POST("updatepost")
    Call<Down_Universe> updatepost(@Query("postid")int postid,@Query("title")String title,@Query("content")String content);

    @POST("focuspost")
    Call<Down_Universe> focuspost(@Query("postid")int postid,@Query("userid")int userid);

    @POST("unfocuspost")
    Call<Down_Universe> unfocuspost(@Query("postid")int postid,@Query("userid")int userid);

    @POST("isfocuspost")
    Call<Down_Universe> isfocuspost(@Query("postid")int postid,@Query("userid")int userid);

    @POST("likepost")
    Call<Down_Universe> likepost(@Query("postid")int postid,@Query("userid")int userid);

    @POST("unlikepost")
    Call<Down_Universe> unlikepost(@Query("postid")int postid,@Query("userid")int userid);

    @POST("islikepost")
    Call<Down_Universe> islikepost(@Query("postid")int postid,@Query("userid")int userid);

    @POST("uppostcomment")
    Call<Down_Universe> uppostcomment(@Query("postid")int postid,@Query("userid")int userid,@Query("content")String content);

    @POST("delpostcomment")
    Call<Down_Universe> delpostcomment(@Query("commentid")int commentid);

    @POST("replypostcomment")
    Call<Down_Universe> replypostcomment(@Query("commentid")int commentid,@Query("userid")int userid,@Query("content")String content,@Query("postid")int postid);

    @POST("delreplypostcomment")
    Call<Down_Universe> delreplypostcomment(@Query("replyid")int replyid);

    @POST("getpostcomment")
    Call<List<Down_PostComment>> getpostcomment(@Query("postid")int postid);

    @POST("getpostcommentreply")
    Call<List<Down_PostReply>> getpostcommentreply(@Query("commentid")int commentid);

    @POST("getmomentlist")
    Call<List<Down_Moment>> getmomentlist(@Query("cityid")int cityid);

    @POST("getmomentlistforfocus")
    Call<List<Down_Moment>> getmomentlistforfocus(@Query("userid")int userid,@Query("cityid")int cityid);

    @POST("getmymomentlist")
    Call<List<Down_Moment>> getmymomentlist(@Query("userid")int userid);

    @POST("getmoment")
    Call<Down_Moment> getmoment(@Query("momentid")int momentid);

    @POST("likemoment")
    Call<Down_Universe> likemoment(@Query("momentid")int momentid,@Query("userid")int userid);

    @POST("unlikemoment")
    Call<Down_Universe> unlikemoment(@Query("momentid")int momentid,@Query("userid")int userid);

    @POST("islikemoment")
    Call<Down_Universe> islikemoment(@Query("momentid")int momentid,@Query("userid")int userid);

    @POST("focususer")
    Call<Down_Universe> focususer(@Query("userid")int userid,@Query("userfid")int userfid);

    @POST("unfocususer")
    Call<Down_Universe> unfocususer(@Query("userid")int userid,@Query("userfid")int userfid);

    @POST("isfocususer")
    Call<Down_Universe> isfocususer(@Query("userid")int userid,@Query("userfid")int userfid);

    @POST("getmomentcomment")
    Call<List<Down_MomentComment>> getmomentcomment(@Query("momentid")int momentid);

    @POST("upmomentcomment")
    Call<Down_Universe> upmomentcomment(@Query("isreply") int isreply,@Query("userid")int userid,@Query("momentid")int momentid,@Query("content")String content,@Query("pic")String pic);

    @Multipart
    @POST("upmoment")
    Call<Down_Universe> upmomentfile(@Query("type")int type,@Query("userid")int userid,@Query("content")String content,@PartMap Map<String,RequestBody> data);

    @POST("upmoment")
    Call<Down_Universe> upmoment(@Query("type")int type,@Query("userid")int userid,@Query("content")String content);

    @POST("getuser")
    Call<Down_UserInfo> getuser(@Query("userid")int userid);

    @POST("getuserpostlist")
    Call<List<Down_Post>> getuserpostlist(@Query("userid")int userid);

    @POST("getusermomentlist")
    Call<List<Down_Moment>> getusermomentlist(@Query("userid")int userid);

    @POST("getmyfocuslist")
    Call<Down_MyFocus> getmyfocuslist(@Query("userid")int userid);

    @POST("getmyfocuspostlist")
    Call<List<Down_Post>> getmyfocuspostlist(@Query("userid")int userid);

    @POST("getmypostlikelist")
    Call<List<Down_Post>> getmypostlikelist(@Query("userid")int userid);

    @POST("getmymomentlikelist")
    Call<List<Down_Moment>> getmymomentlikelist(@Query("userid")int userid);


    @POST("undateusername")
    Call<Down_Universe> updateusername(@Query("userid")int userid,@Query("name")String name);

    @POST("updateuserintro")
    Call<Down_Universe> updateuserintro(@Query("userid")int userid,@Query("intro")String intro);

    @POST("updateusergender")
    Call<Down_Universe> updateusergender(@Query("userid")int userid,@Query("gender")int gender);

    @Multipart
    @POST("updateuserhaedimage")
    Call<Down_Universe> updateuserhaedimage(@Part MultipartBody.Part file, @PartMap Map<String, RequestBody> data);

    @POST("getmessagelist")
    Call<List<Down_MsgCencter>> getmessagelist(@Query("userid")int userid);

    @POST("getmessage")
    Call<List<Down_Msg>> getmessage(@Query("userid1")int userid,@Query("userid2")int userid2);

    @POST("sendmessage")
    Call<Down_Universe> sendnormalmessage(@Query("userid1")int userid1,@Query("userid2")int userid2,@Query("content")String content,@Query("type")int type);

    @Multipart
    @POST("sendmessage")
    Call<Down_Universe> sendimagemessage(@Part MultipartBody.Part file, @PartMap Map<String, RequestBody> data);

    @POST("getversion")
    Call<Down_Update> getversion();

    @POST("delpost")
    Call<Down_Universe> delpost(@Query("id")int postid);

    @POST("delmoment")
    Call<Down_Universe> delmoment(@Query("momentid")int momentid);
}
